async function getThreads(sep, host) {
    let next = sep.nextElementSibling
    let threads = []
    while(next) {
        if('TBODY' === next.tagName.toUpperCase()) {
            let text = next.outerText // innerText
            let tagId = next.getAttribute('id')
            let id = tagId.substring(tagId.lastIndexOf('_') + 1)
            id = id - 0
            threads.push({
                overview: text.trim(),
                id,
                url: `${host}thread-${id}-1-1.html`
            })
        }
        next = next.nextElementSibling
    }
    return threads
}

module.exports = {
    getThreads
}
